package com.ruike.alisurface.ui.answerQuestion.bean;

import java.util.List;

/**
 * Author: voodoo
 * CreateDate: 2023/11/20 020下午 12:59
 * Description: 传入的答题对象
 */
public class QuestionBean {

    /**
     * question_index : 1
     * question_id : 1549284299549851648
     * question_content : 我是第一题
     * question_content_en : null
     * question_type : 0
     * question_type_str : 单选
     * options : [{"option_content":"我是选项A","option_content_en":null,"sort":1,"is_true":false},{"option_content":"我是选项B","option_content_en":null,"sort":2,"is_true":true}]
     * answer_value :
     * loop_id : null
     */

    int question_index;
    String question_id;
    String question_content;
    int question_type;
    String question_type_str;
    String answer_value;
    List<OptionsBean> options;

    public int getQuestion_index() {
        return question_index;
    }

    public void setQuestion_index(int question_index) {
        this.question_index = question_index;
    }

    public String getQuestion_id() {
        return question_id;
    }

    public void setQuestion_id(String question_id) {
        this.question_id = question_id;
    }

    public String getQuestion_content() {
        return question_content;
    }

    public void setQuestion_content(String question_content) {
        this.question_content = question_content;
    }

    public int getQuestion_type() {
        return question_type;
    }

    public void setQuestion_type(int question_type) {
        this.question_type = question_type;
    }

    public String getQuestion_type_str() {
        return question_type_str;
    }

    public void setQuestion_type_str(String question_type_str) {
        this.question_type_str = question_type_str;
    }

    public String getAnswer_value() {
        return answer_value;
    }

    public void setAnswer_value(String answer_value) {
        this.answer_value = answer_value;
    }

    public List<OptionsBean> getOptions() {
        return options;
    }

    public void setOptions(List<OptionsBean> options) {
        this.options = options;
    }

    public static class OptionsBean {
        /**
         * option_content : 我是选项A
         * sort : 1
         * is_true : false
         */

        String option_content;
        int sort;
        boolean is_true;

        boolean isSelect; // 是否被选中，本地添加字段
        int type = 0; // 展示正确错误类型，本地添加字段，0为不展示，>0为正确，<0为错误

        public String getOption_content() {
            return option_content;
        }

        public void setOption_content(String option_content) {
            this.option_content = option_content;
        }

        public int getSort() {
            return sort;
        }

        public void setSort(int sort) {
            this.sort = sort;
        }

        public boolean isIs_true() {
            return is_true;
        }

        public void setIs_true(boolean is_true) {
            this.is_true = is_true;
        }

        public boolean isSelect() {
            return isSelect;
        }

        public void setSelect(boolean select) {
            isSelect = select;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        @Override
        public String toString() {
            return "OptionsBean{" +
                    "option_content='" + option_content + '\'' +
                    ", sort=" + sort +
                    ", is_true=" + is_true +
                    ", isSelect=" + isSelect +
                    ", type=" + (type == 0 ? "不展示" : type > 0 ? "展示正确" : "展示错误") +
                    '}';
        }

    }

    @Override
    public String toString() {
        return "QuestionBean{" +
                "question_index=" + question_index +
                ", question_id='" + question_id + '\'' +
                ", question_content='" + question_content + '\'' +
                ", question_type=" + question_type +
                ", question_type_str='" + question_type_str + '\'' +
                ", answer_value='" + answer_value + '\'' +
                ", options=" + options +
                '}';
    }

//    /**
//     * question_index : 1
//     * question_id : 1285474054878412800
//     * question_content : 题目
//     * question_type : 1
//     * question_type_str : 多选
//     * options : [{"option_content":"选项A","sort":1},{"option_content":"选项B","sort":2}]
//     * answer_value : "[1,2,3]"
//     */
//
//    int question_index;
//    String question_id;
//    String question_content;
//    int question_type;
//    String question_type_str;
//    List<OptionsBean> options;
//    String answer_value;
//
//    public int getQuestion_index() {
//        return question_index;
//    }
//
//    public void setQuestion_index(int question_index) {
//        this.question_index = question_index;
//    }
//
//    public String getQuestion_id() {
//        return question_id;
//    }
//
//    public void setQuestion_id(String question_id) {
//        this.question_id = question_id;
//    }
//
//    public String getQuestion_content() {
//        return question_content;
//    }
//
//    public void setQuestion_content(String question_content) {
//        this.question_content = question_content;
//    }
//
//    public int getQuestion_type() {
//        return question_type;
//    }
//
//    public void setQuestion_type(int question_type) {
//        this.question_type = question_type;
//    }
//
//    public String getQuestion_type_str() {
//        return question_type_str;
//    }
//
//    public void setQuestion_type_str(String question_type_str) {
//        this.question_type_str = question_type_str;
//    }
//
//    public List<OptionsBean> getOptions() {
//        return options;
//    }
//
//    public void setOptions(List<OptionsBean> options) {
//        this.options = options;
//    }
//
//    public String getAnswer_value() {
//        return answer_value;
//    }
//
//    public void setAnswer_value(String answer_value) {
//        this.answer_value = answer_value;
//    }
//
//    public static class OptionsBean {
//
//        /**
//         * option_content : 选项A
//         * sort : 1
//         */
//        String option_content;
//        int sort;
//        boolean isSelect; // 是否被选中，本地添加字段
//        int type = 0; // 展示正确错误类型，本地添加字段，0为不展示，>0为正确，<0为错误
//
//        public String getOption_content() {
//            return option_content;
//        }
//
//        public void setOption_content(String option_content) {
//            this.option_content = option_content;
//        }
//
//        public int getSort() {
//            return sort;
//        }
//
//        public void setSort(int sort) {
//            this.sort = sort;
//        }
//
//        public boolean isSelect() {
//            return isSelect;
//        }
//
//        public void setSelect(boolean select) {
//            isSelect = select;
//        }
//
//        public int getType() {
//            return type;
//        }
//
//        public void setType(int type) {
//            this.type = type;
//        }
//
//        @Override
//        public String toString() {
//            return "OptionsBean{" +
//                    "option_content='" + option_content + '\'' +
//                    ", sort=" + sort +
//                    ", isSelect=" + isSelect +
//                    ", type=" + (type == 0 ? "不展示任何" : type > 0 ? "展示正确" : "展示错误") +
//                    '}';
//        }
//    }
//
//    @Override
//    public String toString() {
//        return "QuestionBean{" +
//                "question_index=" + question_index +
//                ", question_id='" + question_id + '\'' +
//                ", question_content='" + question_content + '\'' +
//                ", question_type=" + question_type +
//                ", question_type_str='" + question_type_str + '\'' +
//                ", answer_value='" + answer_value + '\'' +
//                ", options=" + options +
//                '}';
//    }
}
